# while循环
n = 100
sum = 0
counter = 1
while counter <= n : 
    sum = sum + counter
    counter += 1
print("1 到 %d 之和为: %d" % (n, sum))


# while else 循环
count = 0
while count < 5:
   print (count, " 小于 5")
   count = count + 1
else:
   print (count, " 大于或等于 5")


# for循环
languages = ['zh_CN', 'zh_TW', 'en_US']
for lang in languages:
    print(lang)


# range方法,可以指定起止及步长
ranges = list(range(3, 20, 5))
for i in ranges:
    print(i)

# 循环支持break continue

# pass 语句
# Python pass是空语句，是为了保持程序结构的完整性。
# pass 不做任何事情，一般用做占位语句
str = "hello"
for letter in str : 
    if letter == "o" : 
        pass
        # continue
        print("执行pass")
    else:
        print(letter)
print("Over")
